home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Herra / TIMWIN.ZIP / DCT.CMD < prev    next >
OS/2 REXX Batch file  |  1993-09-22  |  1KB  |  57 lines

  1. ;  TIM-DEMO          0.5.3             DCT
  2. ;
  3. ;**************************************************
  4. parms
  5.   int windis
  6. endparms
  7. cls
  8. print @8 @i "<<TIM>> DEMO           Coordinate transforms         ", @n @r
  9. print @8 "In this demonstration some examples of the 'ct' command"
  10. print @8 "will be shown. "
  11. print @8 "First the difference between enlarging using 'ct' and 'blow' ..."
  12. dest p
  13. copy miss
  14. show p
  15. cstr
  16. *windispl h windis
  17. save a
  18. frmt 40 40            ;zoom in into the right eye
  19. curs 63 163
  20. bord pc 255
  21. *windispl i windis
  22. dest r
  23. blow pc 6
  24. *windispl h windis
  25.  
  26. dest s
  27. print @8 "The left image is enlarged using 'blow' (each pixel"
  28. print @8 "(is just replaced by a 6x6 matrix of that pixel value)"
  29. print @8 "The right image is enlarged using 'ct': pixels are"
  30. print @8 "calculated using bilinear interpolation."
  31. ct pc
  32. *windispl i windis
  33. scroll
  34. start:
  35. print @8 "Now the polygon, shown in 'p' will be mapped onto image 'q'."
  36. print @8 "This can only be done using 'ct' ..."
  37. copy a p
  38. drln p 102  14  18  95 255
  39. drln p  18  95  32 223 255
  40. drln p  32 223 231 243 255
  41. drln p 231 243 102  14 255
  42. text p 128 108   3 "1"
  43. text p 128  12  92 "2"
  44. text p 128  25 221 "4"
  45. text p 128 241 241 "3"
  46. dest p
  47. *windispl h windis
  48.  
  49. dest q
  50. ct p 102 14 18 95 231 243 32 223
  51. *windispl i windis
  52. stop
  53.  
  54.  
  55.  
  56. 
  57.